<template>
  <el-dialog v-bind="$attrs" :top="top" :close-on-click-modal="false" :destroy-on-close="destroyclose" :show-close="showclose" :custom-class="`${customclass} amsp-pop`">
    <amsp-card-title slot="title" v-if="title" style="margin-left:2px;"><span v-html="title"></span></amsp-card-title>
    <slot />
  </el-dialog>
</template>
<script>
export default {
  name: 'Pop',
  props: {
    title: String,
    top: {
      type: String,
      default: '0px'
    },
    customclass: {
      type: String,
      default: ''
    },
    showclose: {
      type: Boolean,
      default: true
    },
    destroyclose: {
      type: Boolean,
      default: false
    }
  }
};
</script>

<style lang="less">
.el-dialog__wrapper {
  position: fixed !important;
}
.amsp-pop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  padding-left: 0;
  .el-dialog__header {
    padding-left: 18px;
  }
  .el-dialog__body {
    padding: 20px 20px 20px 30px;
    // padding-left: 20px;
    // padding-right: 30px;
    // padding-bottom: 20px; 
  }
}
</style>